package cn.simonfish.carrier.common.web;

import cn.simonfish.carrier.common.LoginInfo;

import javax.servlet.http.HttpSession;

/**
 * Created by simon on 2017/10/2.
 */
public class SessionKit {

    public static LoginInfo getLoginInfo(String phone){
        String sid = UserSessionMap.get(phone);
        if(sid != null){
            HttpSession session = SessionMap.get(sid);
            if(session != null){
                LoginInfo loginInfo = (LoginInfo) session.getAttribute(LoginInfo.SESSION_LOGIN);
                return loginInfo;
            }
        }
        return null;
    }
}
